public class J03Change {
    public static void main(String[] args) {
        int num1 = (int)3.14;
        System.out.println("num1 = " + num1);

        System.out.println("==赋值的特殊之处===");

        int i1 = 2;
        //赋值的时候，byte没事
        byte b1 = 3;
        System.out.println("四则运算");
        System.out.println(1+2);//3

        int i5 = 2+3;
        System.out.println("i5 = " + i5);

        System.out.println(10-8);//2
        System.out.println(3*4);//12

        System.out.println("除法");
        System.out.println(10/2);//5
        System.out.println(10/3);//3，舍弃小数
        System.out.println(9/10);//0.9，舍弃小数  0

//        只要有一个小数，结果就没问题
        System.out.println(9.0/10);//
        System.out.println(9/10.0);//
        System.out.println(9.0/10.0);//
//        System.out.println(2/0);//?

        System.out.println("==求余===");
        System.out.println(100%80);//20
        System.out.println(7%4);//3

//        批量定义变量
        int x1=7,x2=9;


        System.out.println("=====");
        int a = 10, b = 8, c = 4;
        int d = a / c + b; //d的值是多少？ 10
        int e = c * b / a; //e的值是多少？  3
        int f = b * c % a; //f的值是多少？  2
        System.out.println("d = " + d);
        System.out.println("e = " + e);
        System.out.println("f = " + f);

        System.out.println(1+1*2);//3

    }
}
